<template>
  <div class="newPc">
    <tabs :index="index"></tabs>
  </div>
  <router-view v-slot="{ Component }">
    <component :is="Component" @change="routerChange" />
  </router-view>
</template>

<script>
//特殊新闻详情页这是个大坑
import tabs from "./tabs.vue";
export default {
  components: { tabs },
  data() {
    return {
      index: 1,
    };
  },

  mounted() {},
  methods: {
    routerChange(e) {
      switch (e) {
        case 2:
          this.index = 1;
          break;
        case 3:
          this.index = 2;
          break;
        case 4:
          this.index = 3;
          break;
      }
    },
  },
};
</script>
<style lang="scss" scoped>
.newPc {
  @include fn.fluidContainer;
  // background: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
}
</style>